﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace Isha.Services
{
    public class IshaServiceContext
    {
        public IshaServiceContext()
        {

        }

        private ILanguageService _languageService;

        public ILanguageService LanguageService
        {
            get
            {
                if (_languageService == null)
                    _languageService = DependencyResolver.Current.GetService<ILanguageService>();

                return _languageService;
            }
        }

        private IContentTypeService _contentTypeService;

        public IContentTypeService ContentTypeService
        {
            get
            {
                if (_contentTypeService == null)
                    _contentTypeService = DependencyResolver.Current.GetService<IContentTypeService>();

                return _contentTypeService;
            }
        }

        private IPartService _partService;

        public IPartService PartService
        {
            get
            {
                if (_partService == null)
                    _partService = DependencyResolver.Current.GetService<IPartService>();

                return _partService;
            }
        }

        private IContentItemService _contentItemService;

        public IContentItemService ContentItemService
        {
            get
            {
                if (_contentItemService == null)
                    _contentItemService = DependencyResolver.Current.GetService<IContentItemService>();

                return _contentItemService;
            }
        }

        private ISecurityService _securityService;

        public ISecurityService SecurityService
        {
            get
            {
                if (_securityService == null)
                    _securityService = DependencyResolver.Current.GetService<ISecurityService>();

                return _securityService;
            }
        }
    }
}
